<extend name="template/base_index"/>


<block name="area_header">
</block>

<block name="area_body">
    {:W('Menus/topbar')}
    <div class="admin-main container-fluid">
        {:W('Menus/left')}
        <div class="admin-main-content">
            {:W('Menus/breadcrumb')}
            <div class="filter-controls">
                导航：
                <a href="{:U('Admin/Category/index',array('parent'=>$cate['parent']))}" class="btn btn-link">{$cate.name}</a>
            </div>
            <div>

                <!--<volist name="lang" id="vo">-->
                    <!--<div class="btn-group">-->
                        <!--<a class="btn btn-primary btn-sm"  href="{:U('Admin/CategoryProp/index',array('cate_id'=>$cate_id,'lang'=>$vo['value']))}">{$vo.name}</a>-->
                    <!--</div>-->
                <!--</volist>-->

                <a href="{:U('Admin/Category/index',array('parent'=>$cate['parent']))}" class="btn btn-default btn-sm"><i class="fa fa-reply"></i>返回</a>
                <a class="btn btn-primary btn-sm" href="{:U('Admin/CategoryProp/add',array('cate_id'=>$cate_id))}"><i
                        class="fa fa-plus"></i>{:L('BTN_ADD')}</a>
                <a href="{:U('Admin/CategoryProp/saveSort',array('cate_id'=>$cate_id))}" class=" btn btn-default btn-sm confirm ajax-post" target-form="selectitem"><i class="fa fa-save"></i>选中保存排序</a>

                <table class="table table-striped table table-hover  table-condensed">
                    <thead>
                    <tr>
                        <th>
                            <input type="checkbox" class="selectall" onclick="myUtils.selectall(this,'.selectitem');"/>
                        </th>
                        <th>
                            属性名称
                        </th>
                        <th>
                            排序
                        </th>
                        <th>
                            操作
                        </th>
                    </tr>
                    </thead>
                    <tbody>
                    <empty name="list">
                        <tr>
                            <td colspan="3" class="text-center">{:L('NO_DATA')}</td>
                        </tr>
                        <else/>

                        <volist name="list" id="vo">
                            <tr>
                                <td>
                                    <input type="checkbox" value="{$vo.propid}" name="ids[]" class="selectitem"/></td>
                                <td>
                                    <a href="{:U('Admin/CategoryPropvalue/index',array('prop_key'=>$vo['propid'],'cate_id'=>$cate_id,'prop_id'=>$vo['id']))}">{$vo.propname}</a>
                                </td>
                                <td>

                                    <input type="text" style="width: 40px;" value="{$vo.sort}" name="sort_{$vo.propid}" class="sort selectitem" />
                                </td>
                                <td>
                                    <a href="{:U('Admin/CategoryProp/edit',array('cate_id'=>$cate_id,'propid'=>$vo['propid']))}"
                                       class="btn btn-sm btn-default"><i class="fa fa-edit"></i>编辑</a>
                                    <a href="{:U('Admin/CategoryProp/delete',array('id'=>$vo['id'],'propid'=>$vo['propid']))}"
                                       class="btn btn-sm btn-danger ajax-get confirm"><i class="fa fa-trash"></i>删除</a>
                                </td>
                            </tr>
                        </volist>
                    </empty>
                    </tbody>
                </table>
            </div>
        </div>

    </div>
    <!-- END admin-main-content -->
    </div>
    <!-- END admin-main-->
</block>

<block name="area_footer">
</block>